.page {
    width: 100%;
    min-height: 100vh;
    background-color: #F5F5F5;
    padding-bottom: 70px;
}

/* 顶部导航 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    padding: 0 15px;
    height: 82px;
    background-color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.back-icon {
    margin-top: 50px;
    width: 24px;
    height: 24px;
    z-index: 1;
}

.header-title {
    margin-top: 50px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    font-weight: 600;
    color: black;
}

.header-right {
    width: 24px; /* 与返回按钮宽度一致，保持标题居中 */
}

/* 帖子卡片 */
.post-card {
    background-color: #FFFFFF;
    padding: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    margin-top: 82px; /* 为固定头部留出空间 */
}

.post-card:active {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

/* 作者信息 */
.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #E8F5E9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #4CAF50;
    font-weight: 600;
}

.avatar.small {
    width: 30px;
    height: 30px;
    font-size: 14px;
}

.user-info {
    margin-left: 12px;
}

.username {
    font-weight: 600;
    font-size: 16px;
    color: #333333;
    display: block;
}

.post-time {
    color: #999999;
    font-size: 13px;
    margin-top: 3px;
    display: block;
}

/* 帖子内容 */
.post-content {
    margin-bottom: 20px;
}

.post-title {
    font-size: 18px;
    font-weight: 600;
    color: #222222;
    display: block;
    margin-bottom: 12px;
    line-height: 1.5;
}

.post-text {
    font-size: 16px;
    color: #555555;
    line-height: 1.8;
    white-space: pre-line;
}

/* 互动数据 */
.post-stats {
    display: flex;
    padding-top: 12px;
    border-top: 1px solid #F0F0F0;
}

.stat-item {
    display: flex;
    align-items: center;
    margin-right: 25px;
    color: #666666;
    font-size: 15px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.stat-item:active {
    color: #4CAF50;
}

.stat-icon {
    font-size: 20px;
    margin-right: 6px;
}

/* 评论区 */
.comments-section {
    background-color: #FFFFFF;
    margin-top: 5px;
    padding: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.comments-title {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #F0F0F0;
}

.comment-placeholder {
    padding: 30px 0;
    text-align: center;
    color: #999;
    font-size: 15px;
}

/* 楼层 */
.floor-item {
    padding: 15px 0;
    border-bottom: 1px solid #F0F0F0;
}

.floor-item:last-child {
    border-bottom: none;
}

.floor-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.floor-content {
    margin-left: 57px;
    margin-bottom: 15px;
}

.floor-text {
    font-size: 15px;
    color: #444;
    line-height: 1.6;
}

/* 评论 */
.comments-container {
    margin-left: 57px;
    background-color: #F9F9F9;
    border-radius: 8px;
    padding: 10px;
}

.comment-item {
    padding: 8px 0;
    border-bottom: 1px solid #EEE;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.comment-content {
    margin-left: 42px;
}

.comment-text {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* 加载中样式 */
.loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 200px;
    gap: 10px;
    margin-top: 65px; /* 为固定头部留出空间 */
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #E0E0E0;
    border-top-color: #8CE090;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 底部输入框 */
.input-section {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #fff;
    border-top: 1px solid #eee;
    z-index: 999;
}

.input-field {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    margin-right: 10px;
}

.publish-btn {
    background-color: #8CE090;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
}

/* 帖子图片 */
.post-images {
    margin: 15px 0;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 8px;
}

.image-grid.single-image {
    grid-template-columns: repeat(1, 1fr);
    max-width: 300px;
}

.post-image,
.floor-image {
    width: 100%;
    height: 100px;
    border-radius: 8px;
}

/* 楼层图片 */
.floor-images {
    margin: 10px 0 15px 57px;
}